The present invention relates to image-taking apparatuses, such as video cameras and digital still cameras, which have an autofocus function, and to a focusing method for the image-taking apparatuses.
In so-called autofocus of contrast detection method (hereinafter referred to as contrast AF), high frequency components of an image-pickup signal are extracted, and focusing is obtained by searching a focus lens position at which the high frequency components become maximum. In the contrast AF, focusing can be highly accurately obtained since the focusing control is performed by using an image-pickup signal which is a signal obtained by photoelectrically converting an optical image formed by an image-taking optical system. In particular, the contrast AF is effective for a camera using an image-pickup element with a large number of pixels which requires high focusing accuracy. However, in AF based on this method, the focus lens is moved while an in-focus position is searched. As a result, a relatively long time is needed until an in-focus state is obtained.
On the other hand, in autofocus of a direct distance measuring method using a so-called pupil-dividing phase-difference detection method (hereinafter referred to as external distance measuring AF), a distance to an object is directly measured, so that it is possible to easily specify an in-focus position, and to thereby obtain an in-focus state in a short period of time. However, in this method, the distance measuring is performed through a system different from the image-pickup system, and hence, the focusing accuracy is liable to be deteriorated by a temperature change and the like.
Thus, in recent years, a hybrid AF has been proposed in which high speed and high accuracy autofocus is realized by using the contrast AF in combination with the external distance measuring AF (Japanese Patent Laid-Open No. 2001-264622, Japanese Patent Laid-Open No. 2001-141984, Japanese Patent Laid-Open No. H03-81713).
In Japanese Patent Laid-Open No. 2001-264622, there is proposed a method in which switching from the external distance measuring AF to the contrast AF is performed in accordance with an operation of an image-taking switch. Further, in Japanese Patent Laid-Open No. 2001-264622, there is proposed a method in which a difference between in-focus positions detected by the external distance measuring AF and the contrast AF, respectively, is obtained, and in which when the difference is not less than a predetermined value, one of the external distance measuring AF and the contrast AF is selected in accordance with a predetermined condition.
Further, in Japanese Patent Laid-Open No. 2001-141984, there is proposed a method in which a focus lens is driven to a front focus/rear focus position by a predetermined amount by the external distance measuring AF, and thereafter the switching from the external distance measuring AF to the contrast AF is performed. In this method, when an in-focus state cannot be obtained by the contrast AF after the switching, the focusing mode is again returned to the external distance measuring AF.
Further, in Japanese Patent Laid-Open No. H03-81713, there is proposed a method in which when the focal point is largely deviated and the high frequency components are not contained in the image-pickup signal, determination of the direction of an in-focus position and drive of a focus lens are performed by the external distance measuring AF, and in which after the high frequency components are detected, an in-focus state is obtained by the contrast AF.
Meanwhile, many of recent cameras are provided with a so-called image shake correction (or image stabilization) function. As a system having such a image shake correction function, there is an optical image shake correction system in which camera shake information is detected by using an angular velocity sensor represented by a vibration gyroscope and the like, and in which a part of the optical system is driven so as to cancel the shake on the basis of the detected shake information. Further, there is also a system in which an image-pickup element is moved in a direction orthogonal to the optical axis so as to cancel the shake, in accordance with the detected shake information. Further, there is also a so-called electronic image shake correction system in which an image hardly having an image shake is obtained by arranging such that a motion vector is detected from an electronic image generated on the basis of an output from an image-pickup element, and that a pickup area of the image is changed on the basis of the vector information.
However, in the case where the external distance measuring AF which is used independently or as a part of the hybrid AF, is performed, when a camera shake occurs, the position of an optical image is shifted on a light receiving sensor (line sensor) for the external distance measuring AF. In particular, when the optical image is shifted to the arrangement direction of light receiving elements which constitute the line sensors, accurate distance measuring information is not obtained, and the focusing accuracy is also deteriorated. Even when the image shake correction function is provided for the image-pickup system, the external distance measuring AF is performed in a system different from the image-pickup system, resulting in such a problem.